import request from '@/sheep/request';

const MessageApi = {
  // 查询未读消息数
  queryUnReadNoticeNum: (data) => {
    return request({
      url: '/relation/message/queryUnReadNoticeNum',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 查询用户消息列表
  queryUserMessageList: (data) => {
    return request({
      url: '/relation/message/queryUserMessageList',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 阅读消息
  readNotice: (data) => {
    return request({
      url: '/relation/message/readNotice',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 阅读所有消息
  readAllNotice: (data) => {
    return request({
      url: '/relation/message/readAllNotice',
      method: 'POST',
      custom: {
        auth: true
      },
    });
  },
  // 查询最近未读消息
  queryRecentMessage: () => {
    return request({
      url: '/relation/message/queryRecentMessage',
      method: 'POST',
      custom: {
        auth: true
      },
    });
  },
};

export default MessageApi;
